(function($){
	$.fn.checkVerifycodeLink = function() {
		getVerifyCode('a_vc', 'a_vt');
		this.click(function(){
			getVerifyCode('a_vc', 'a_vt');
			return false;
		});
	};

	$.xlaq_acount = {
		//是否允许点击按钮，1为允许，0为不允许
		_submit : 1,
		_aqMobile : 0,
		_bindMobile : 0,
		_aqMail : 0,
		_bindMail : 0,


		//页面初始化函数
		initAccount: function(jdata) {
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			var M_INFO = unescape($.xlaq.getCookie("m_info"));
			var M_INFO_ARY = M_INFO.split("&");

			if(menuno == 3) {  //account_index.html
				$.xlaq_acount.initAccountIndex();
			} else if(menuno == 53) {  //account_check.html
				var set = $.xlaq.request('set');
				var type = $.xlaq.request('type');  //本次操作是新增或修改，add:新增;change:修改
				var checkby = $.xlaq.request('checkby');
				$.xlaq_acount.initAccountCheck(set,type,checkby);
			} else if(menuno == 43) {  //account_idauth.html

				var f_submit3 = false;
				$('.btn_nor').click(function(){
					if(f_submit3) return false;
					f_submit3 = true;
					$.xlaq.closeFormTips();

					var v_name = $.trim($('#a_name').val());
					if(!$.xlaq_acount.validTruename(v_name)) {
						$.xlaq.showFormTips('a_name', '*请输入正确的姓名');
						f_submit3 = false;
						return false;
					}
					var v_no = $.trim($('#a_no').val());
					if(!$.xlaq_acount.validIdno(v_no)) {
						$.xlaq.showFormTips('a_no', '*您的身份证号码不合法');
						f_submit3 = false;
						return false;
					}
					$.xlaq.showTopTips('正在设置中，请稍候...');
					var params="m=set_check&name="+encodeURIComponent(v_name)+"&no="+v_no;
					var url = DOMAIN_AQ+'interface/idauth?'+params;
					$.getJSON(url+"&jsoncallback=?", function(json3){
						f_submit3 = false;
						$.xlaq.closeTopTips();
						if(json3.result == 0) {
							$('#wp_main_idauth').hide();
							$('#wp_main_idauth2').show();
							var score = parseInt(C_AQINFO_ARY[0]);
							score = score + 10;
							$.xlaq_acount.showAqLevel('wp_main_idauth2',score);
							$.xlaq.setAqCookie('aq_info', '');
						} else if(json3.result == 1401) {
							$.xlaq.showFormTips('a_no', '*您的身份证号码不合法');
							return false;
						} else if(json3.result == 1402) {
							$.xlaq.showFormTips('a_name', '*请输入正确的姓名');
							return false;
						} else {
							$.xlaq.showTopTips(ERROR_AQ[json3.result], 1);
							$.xlaq.closeTopTipsDelay(3);
							return false;
						}
					});
				});
			} else if(menuno == 13) {  //account_mail.html
				if(parseInt(C_AQINFO_ARY[1]) == 1){
					//针对未激活邮箱，进入激活邮箱流程
					$('#wp_main_mail2').show();
					//获取用户未激活邮箱
					var mail = M_INFO_ARY[0];
					$('#wp_main_mail2 .ver_con').html('<li><span class="cho">'+mail+'</span></li>');
					$('#wp_main_mail2 .btn_nor').click(function(){
						$.xlaq_acount.sendMail3();
					});

				}else{
					//新增或修改邮箱
					$('#wp_main_mail').show();
					//点击邮箱输入框，若邮箱已设置，则获取邮箱信息,并调用showDrop函数
					$('#mail').click(function(){
						if(!$('#mail').val()){
							if($('.drop').is(":hidden")){
								$.xlaq_acount.showDrop('mail');
							}else{
								$('.drop').hide();
							}
						}
					});
					//用户在邮箱输入框输入时，若有下拉框，则隐藏
					$('#mail').bind('keyup',function(){
						$('.drop').hide();
					});
					getVerifyCode2('code');

					//点击切换验证码事件
					$('#code').click(function(){
						getVerifyCode2('code');
					});
					// 点击按钮重置邮箱
					$('#submit').click(function(){
						if($.xlaq_acount._submit == 0) return;
						$.xlaq.closeFormTips();

						var mail = $.trim($('#mail').val());
						if(!mail){
							$.xlaq.showFormTips('has_drop', '*请输入您的邮箱');
							return false;
						}
						if(!$.xlaq_acount.validMail(mail)) {
							$.xlaq.showFormTips('has_drop', '*邮箱格式不正确');
							return false;
						}

						var code = $.trim($('#codeInput').val());
						if(!code){
							$('#code').after('<span class="warn" style="vertical-align:11px;"> *验证码不能为空</span>');
							return false;
						}
						if(code.length != 4){
							$('#code').after('<span class="warn" style="vertical-align:11px;"> *验证码格式不正确</span>');
							return false;
						}
						var oldAqMail = M_INFO_ARY[0];
						var oldBindMail = M_INFO_ARY[1];
						if(oldAqMail || oldBindMail){
							if(mail != oldAqMail || mail != oldBindMail){
								var hideMail = $.xlaq_acount.getHideAccount(mail,'mail');
								var content = '新邮箱<span class="txt_r">'+hideMail+'</span>验证并激活成功后，将替换旧邮箱';
								$.xlaq.confirm(content, function(){
									var mail = $.trim($('#mail').val());
									var code = $.trim($('#codeInput').val());
									$.xlaq_acount.sendMail2(mail,0,code);
								});
							}
							return false;
						}
						$.xlaq_acount.sendMail2(mail,0,code);
					});
					//重新填写邮件事件
					$('#rewrite').click(function(){
						$('#wp_main_mail3').hide();
						$('#wp_main_mail').show();
						$('#mail').val('');
						$('#codeInput').val('');
						getVerifyCode2('code');
					});
					$('.rewrite').show();
				}
			} else if(menuno == 23) {  //account_question.html
				if (C_AQINFO_ARY[3]==0 && "https://aq.xunlei.com/account_check.html?set=question&type=add" != document.referrer) {
					window.location = "account_check.html?set=question&type=add";
				} else if (C_AQINFO_ARY[3]==1 && "https://aq.xunlei.com/account_check.html?set=question&type=change" != document.referrer &&
					"https://aq.xunlei.com/account_check.html?set=question&type=change&checkby=question" != document.referrer) {
					var type = $.xlaq.request("type"),
						mail = $.xlaq.request("mail"),
						code = $.xlaq.request("code");
					"question" == type && "" != mail && "" != code || (window.location = "account_check.html?set=question&type=change");
				}
				var f_submit3 = false;
				$('.sel').click(function(){
					if($(this).attr('class') == 'sel disable'){
						return;
					}
					var index = $(this).attr('id').substring(4);
					if($('#que_list_'+index).is(':hidden')){
						$('.drop').hide();
						$('#que_list_'+index).slideDown(300);
					}else{
						$('#que_list_'+index).slideUp(300);
					}
				});
				$('.drop a').click(function(){
					var id = $(this).attr('id');
					listIndex = id.substring(4,5);
					queIndex = id.substring(6);
					var queStr = $(this).html();
					$('#sel_'+listIndex).html(queStr);
					$('#que'+listIndex).html(queIndex);
					$('#que_list_'+listIndex).slideUp(300);
				});


				$('#btn1 .btn_nor').click(function(){

					if(f_submit3) return false;
					f_submit3 = true;
					$.xlaq.closeFormTips();

					var v_que1 = $.trim($('#que1').html());
					var v_ans1 = $.trim($('#ans1').val());
					var v_que2 = $.trim($('#que2').html());
					var v_ans2 = $.trim($('#ans2').val());
					var v_que3 = $.trim($('#que3').html());
					var v_ans3 = $.trim($('#ans3').val());

					if(v_que1 == 0) {
						$.xlaq.showFormTips('que1', '*请选择密保问题');
						f_submit3 = false;
						return false;
					}
					if(v_ans1 == '') {
						$.xlaq.showFormTips('ans1', '*请填写密保答案');
						$('#ans1').focus();
						f_submit3 = false;
						return false;
					}
					if(!$.xlaq_acount.validAnswer(v_ans1)) {
						$.xlaq.showFormTips('ans1', '*密保答案不能含有特殊字符');
						$('#ans1').focus();
						f_submit3 = false;
						return false;
					}
					if(v_que2 == 0) {
						$.xlaq.showFormTips('que2', '*请选择密保问题');
						f_submit3 = false;
						return false;
					}
					if(v_que2 == v_que1) {
						$.xlaq.showFormTips('que2', '*密保问题重复，请重新选择');
						f_submit3 = false;
						return false;
					}
					if(v_ans2 == '') {
						$.xlaq.showFormTips('ans2', '*请填写密保答案');
						$('#ans2').focus();
						f_submit3 = false;
						return false;
					}
					if(!$.xlaq_acount.validAnswer(v_ans2)) {
						$.xlaq.showFormTips('ans2', '*密保答案不能含有特殊字符');
						$('#ans2').focus();
						f_submit3 = false;
						return false;
					}
					if(v_que3 == 0) {
						$.xlaq.showFormTips('que3', '*请选择密保问题');
						f_submit3 = false;
						return false;
					}
					if(v_que3 == v_que1 || v_que3 == v_que2 ) {
						$.xlaq.showFormTips('que3', '*密保问题重复，请重新选择');
						f_submit3 = false;
						return false;
					}
					if(v_ans3 == '') {
						$.xlaq.showFormTips('ans3', '*请填写密保答案');
						$('#ans3').focus();
						f_submit3 = false;
						return false;
					}
					if(!$.xlaq_acount.validAnswer(v_ans3)) {
						$.xlaq.showFormTips('ans3', '*密保答案不能含有特殊字符');
						$('#ans3').focus();
						f_submit3 = false;
						return false;
					}

					$.xlaq.showTopTips('正在提交中，请稍候...');
					var params="m=set&q="+v_que1+"_"+v_que2+"_"+v_que3+"&ans1="+encodeURIComponent(v_ans1)+"&ans2="+encodeURIComponent(v_ans2)+"&ans3="+encodeURIComponent(v_ans3);
					var url = DOMAIN_AQ+'interface/question?'+params;
					$.getJSON(url+"&jsoncallback=?", function(json3){
						f_submit3 = false;
						$.xlaq.closeTopTips();
						if(json3.result == 0) {
							$('#wp_main_question .verify h3').html('请回答您的密保问题');
							$('#wp_main_question .sel').attr('class','sel disable');
							$('#btn1').hide();
							$('#btn2').show();
							$('#ans1').val('');
							$('#ans2').val('');
							$('#ans3').val('');
							$('#ans1').focus();
							f_submit3 = false;
							$('#btn2 .btn_nor').click(function(){
								if(f_submit3) return false;
								f_submit3 = true;
								$.xlaq.closeFormTips();

								var v_ans1 = $.trim($('#ans1').val());
								var v_ans2 = $.trim($('#ans2').val());
								var v_ans3 = $.trim($('#ans3').val());

								if(v_ans1 == '') {
									$.xlaq.showFormTips('ans1', '*请回答密保问题');
									$('#ans1').focus();
									f_submit3 = false;
									return false;
								}
								if(!$.xlaq_acount.validAnswer(v_ans1)) {
									$.xlaq.showFormTips('ans1', '*密保答案不能含有特殊字符');
									$('#ans1').focus();
									f_submit3 = false;
									return false;
								}
								if(v_ans2 == '') {
									$.xlaq.showFormTips('ans2', '*请回答密保问题');
									$('#ans2').focus();
									f_submit3 = false;
									return false;
								}
								if(!$.xlaq_acount.validAnswer(v_ans2)) {
									$.xlaq.showFormTips('ans2', '*密保答案不能含有特殊字符');
									$('#ans2').focus();
									f_submit3 = false;
									return false;
								}
								if(v_ans3 == '') {
									$.xlaq.showFormTips('ans3', '*请回答密保问题');
									$('#ans3').focus();
									f_submit3 = false;
									return false;
								}
								if(!$.xlaq_acount.validAnswer(v_ans3)) {
									$.xlaq.showFormTips('ans3', '*密保答案不能含有特殊字符');
									$('#ans3').focus();
									f_submit3 = false;
									return false;
								}

								$.xlaq.showTopTips('正在设置中，请稍候...');
								var params="m=set_check&ans1="+encodeURIComponent(v_ans1)+"&ans2="+encodeURIComponent(v_ans2)+"&ans3="+encodeURIComponent(v_ans3);
								var url = DOMAIN_AQ+'interface/question?'+params;
								$.getJSON(url+"&jsoncallback=?", function(json3){
									f_submit3 = false;
									$.xlaq.closeTopTips();
									if(json3.result == 0) {
										var score = parseInt(C_AQINFO_ARY[0]);
										if(C_AQINFO_ARY[3] == 0){
											score = score + 10;
										}
										$('#wp_main_question').hide();
										$('#wp_main_question2').show();
										$.xlaq_acount.showAqLevel('wp_main_question2',score);
										$.xlaq.setAqCookie('aq_info', '');
									} else if(json3.result == 1305) {
										$.xlaq.showFormTips('ans1', '*密保答案错误! 请重新填写或<a style="color:#1F8DD9;" href="/account_question.html">返回修改</a>');
										return false;
									} else if(json3.result == 1306) {
										$.xlaq.showFormTips('ans2', '*密保答案错误! 请重新填写或<a style="color:#1F8DD9;" href="/account_question.html">返回修改</a>');
										return false;
									} else if(json3.result == 1307) {
										$.xlaq.showFormTips('ans3', '*密保答案错误! 请重新填写或<a style="color:#1F8DD9;" href="/account_question.html">返回修改</a>');
										return false;
									} else {
										$.xlaq.showTopTips(ERROR_AQ[json3.result], 1);
										$.xlaq.closeTopTipsDelay(5);
										return false;
									}
								});
							});
						} else {
							$.xlaq.showTopTips(ERROR_AQ[json3.result], 1);
							$.xlaq.closeTopTipsDelay(5);
							return false;
						}
					});
				});
			} else if(menuno == 33) {  //account_mobile.html
                var code = $.xlaq.request("code");
                if(!code){
                    if("https://aq.xunlei.com/account_check.html?set=mobile&type=add" != document.referrer &&
                        "https://aq.xunlei.com/account_check.html?set=mobile&type=change" != document.referrer){
                        window.location = "account_index.html";
                    }
                }
				//点击手机输入框，若手机已设置，则获取手机信息并在下拉框里展示
				$('#mobile').click(function(){
					if(!$('#mobile').val()){
						if($('.drop').is(":hidden")){
							$.xlaq_acount.showDrop('mobile');
						}else{
							$('.drop').hide();
						}
					}
				});
				//用户在手机输入框输入时，若有下拉框，则隐藏
				$('#mobile').bind('keyup',function(){
					$('.drop').hide();
				});

				// 点击按钮提交手机验证码验证
				$('#submit').click(function(){
					$.xlaq.closeFormTips();
					var mobile = $.trim($('#mobile').val());
					if(!$.xlaq_acount.validMobile(mobile)) {
						$.xlaq.showFormTips('has_drop', '*请输入正确的手机号码');
						return false;
					}
					var code = $.trim($('#sms_code').val());
					if(code == '' || code.length != 6) {
						$.xlaq.showFormTips('sms_code', '*请输入6位短信验证码');
						return false;
					}
					$.xlaq_acount.checkMobileCode(mobile,code,2);
				});
				// 发送或重新发送验证码
				$('#getcode').click(function(){
					$.xlaq.closeFormTips();
					var mobile = $.trim($('#mobile').val());
					if(!$.xlaq_acount.validMobile(mobile)) {
						$.xlaq.showFormTips('has_drop', '*请输入正确的手机号码');
						return;
					}
					$.xlaq_acount.getMobileCode(mobile,2);
				});
			} else if(menuno == 63) {  //aq_alert.html
				var f_submit3 = false;
				$('.wp_cont .ft .btn').click(function(){
					if(f_submit3) return false;
					f_submit3 = true;

					var total_num = $("#safe_s0").val();
					var ip_num = $("#safe_s1").attr('checked') ? 1 : 0;
					var phone_num = $("#safe_s3").attr('checked') ? 1 : 0;
					var email_num = $("#safe_s4").attr('checked') ? 1 : 0;
					var pwd_num = $("#safe_s2").attr('checked') ? 1 : 0;
					var question_num = $("#safe_s5").attr('checked') ? 1 : 0;
					$.xlaq.showTopTips('正在设置中，请稍候...');
					var params="m=msg_set&total_num="+total_num+"&ip_num="+ip_num+"&phone_num="+phone_num+"&email_num="+email_num+"&pwd_num="+pwd_num+"&question_num="+question_num;
					var url = DOMAIN_AQ+'interface/account?'+params;
					$.getJSON(url+"&jsoncallback=?", function(json3){
						f_submit3 = false;
						$.xlaq.closeTopTips();
						if(json3.result == 0) {
							$.xlaq.showTopTips('您的安全特权短信提示设置成功！');
							$.xlaq.closeTopTipsDelay(3);
							return false;
						} else if(json3.result == 1012) {
							$.xlaq.showTips(2, '您目前还不是迅雷会员用户，无法使用安全特权！', "开通迅雷会员", "$.xlaq.goVipPaid");
							return false;
						} else if(json3.result == 1013) {
							$.xlaq.showTips(2, '您必须设置手机才能使用特权，请您先设置手机！', "设置手机", "$.xlaq.goMobileSet");
							return false;
						} else {
							$.xlaq.showTopTips(ERROR_AQ[json3.result], 1);
							$.xlaq.closeTopTipsDelay(3);
							return false;
						}
					});
				});
			} else if(menuno == 73) {  //account_find.html
				getVerifyCode2('code');
				$('#mailInput').val('旧安全邮箱');
				$('#codeInput').val('请输入验证码');
				$('#orderInput').val('订单号');    // 订单号输入框
				$('#orderPhoneInput').val('付款手机');  // 付款手机输入框
				$('#mailInput').blur(function(){
					if($.trim($(this).val()) == '') {
						$(this).val('旧安全邮箱');
					}
				}).focus(function(){
					if($.trim($(this).val()) == '旧安全邮箱') {
						$(this).val('');
					}
				});
				$('#codeInput').blur(function(){
					if($.trim($(this).val()) == '') {
						$(this).val('请输入验证码');
					}
				}).focus(function(){
					if($.trim($(this).val()) == '请输入验证码') {
						$(this).val('');
					}
				});
				$('#orderInput').blur(function(){
					if($.trim($(this).val()) == '') {
						$(this).val('订单号');
					}
				}).focus(function(){
					if($.trim($(this).val()) == '订单号') {
						$(this).val('');
					}
				});
				$('#orderPhoneInput').blur(function(){
					if($.trim($(this).val()) == '') {
						$(this).val('付款手机');
					}
				}).focus(function(){
					if($.trim($(this).val()) == '付款手机') {
						$(this).val('');
					}
				});
				//绑定点击获取验证码事件
				$('#code').click(function(){
					getVerifyCode2('code');
				});

				// 订单找回页面提示
				$('#tips').click(function() {
					$.xlaq.popTips('<img src="/v2.0/images/alipay_order_no.png">');
				});

				// 订单找回结果页面,点击复制按钮,将结果复制到粘贴板
				$('#copy_account').click(function() {
					var account = $('#account').html();
					if( window.clipboardData && clipboardData.setData ) {
						clipboardData.clearData();
						clipboardData.setData("Text", account);
						$.xlaq.showTopTips('复制成功');
					} else {
						$.xlaq.showTopTips('非IE浏览器请手动复制');
					}
					return false;
				});

				$(".method_table td a").click( function () {
					// 修改选中方法的字体颜色
					$(".method_table td a").css('color', 'blue');
					$(this).css('color', '#000');

					// 清除之前的错误提示
					$.xlaq.closeFormTips();

					// 将选中的方法保存起来
					$('#selectedMethod').val($(this).attr('id'));

					switch ($(this).attr('id')) {
						case 'mailMethod':
							$('#warn_tips').html('温馨提示：请输入需要找回帐号对应的旧安全邮箱');
							$('#mailLi').show();
							$("#orderLi, #orderPhoneLi").hide();
							break;
						case 'orderMethod':
							$('#warn_tips').html('温馨提示：请输入需要找回帐号对应的订单号');
							$("#orderLi").show();
							$("#mailLi, #orderPhoneLi").hide();
							break;
						case 'orderPhoneMethod':
							$('#warn_tips').html('温馨提示：请输入需要找回帐号对应的付款手机');
							$("#orderPhoneLi").show();
							$("#orderLi, #mailLi").hide();
							break;
						default :
							break;
					}
				});

				/*  查询订单的接口
				 http://10.10.10.205:8888/getXunleiIdByPhoneCmd?phone=13714985180
				 http://10.10.10.205:8888/getXunleiIdByXunleiPayIdCmd?xunleiPayId=15022750241522010200
				 */

				//点击确定提交
				var f_submit3 = false;
				$('#wp_main1 .btn_nor').click(function(){
					if(f_submit3) return false;
					f_submit3 = true;

					$.xlaq.closeFormTips();
					var f_error = 0;

					// 先判断验证码是否正确
					var verifycode = $.trim($('#codeInput').val());
					if(verifycode == '' || verifycode == '请输入验证码') {
						$('.code').after('<span class="warn" style="vertical-align:11px;">*请输入验证码</span>');
						f_error = 1;
					}

					//$.xlaq.showFormTips('account', '*请您的安全邮箱');

					// 判断是使用哪种方法找回账号，并判断是否已经输入
					switch ($('#selectedMethod').val()) {
						case 'mailMethod':
							var mail = $.trim($('#mailInput').val());
							if(mail == '' || mail == '旧安全邮箱') {
								//$.xlaq.showFormTips('account', '*请输入您的安全邮箱');
								$('#mailInput').after('<span class="warn" style="vertical-align:11px;">*请输入您的安全邮箱</span>');
								f_error = 1;
							}
							break;
						case 'orderMethod':
							var order = $.trim($('#orderInput').val());
							if(order == '' || order == '订单号') {
								$('#orderInput').after('<span class="warn" style="vertical-align:11px;">*请输入您的订单号</span>');
								f_error = 1;
							}
							break;
						case 'orderPhoneMethod':
							var orderPhone = $.trim($('#orderPhoneInput').val());
							if (orderPhone == '' || orderPhone == '付款手机') {
								$('#orderPhoneInput').after('<span class="warn" style="vertical-align:11px;">*请输入您的付款手机</span>');
								f_error = 1;
							} else if (!$.xlaq_acount.validMobile(orderPhone)) {
								$('#orderPhoneInput').after('<span class="warn" style="vertical-align:11px;">*请输入正确的手机号码</span>');
								f_error = 1;
							}
							break;
						default :
							break;
					}

					if(f_error) {
						f_submit3 = false;
						return false;
					}


					// step1
					$.xlaq.showTopTips('正在查询，请稍候...');

					// 判断是使用哪种方法找回账号，并调用相应的接口
					switch ($('#selectedMethod').val()) {
						case 'mailMethod':
							var params="m=account_find_send&mail="+encodeURIComponent(mail)+"&verifycode="+verifycode;
							var url = DOMAIN_AQ+'interface/mail?'+params;
							$.getJSON(url+"&jsoncallback=?", function(json){
								f_submit3 = false;
								$.xlaq.closeTopTips();
								if(json.result == 0) {
									$('#wp_main1').hide();
									$('#wp_main2').show();
									$('#wp_main2 .txt_b').html($.xlaq_acount.getHideAccount(mail, 'mail'));
									$('#wp_main2 .btn_nor').attr('href',json.data.mail_url);
									return false;
								} else if(json.result == 1203 || json.result == 1204 || json.result == 1207) {
									$.xlaq.showFormTips('mailInput', '*'+ERROR_AQ[json.result]);
								} else if(json.result == 1206) {    // 验证码错误
									$('.code').after('<span class="warn" style="vertical-align:11px;">*'+ERROR_AQ[json.result]+'</span>');
								} else if(json.result == 1205) {
									$.xlaq.showFormTips('mailInput', '*系统检测出您输入的邮箱是无效邮箱，无法正常接收邮件');
								} else {
									$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
									$.xlaq.closeTopTipsDelay(8);
								}
								getVerifyCode2('code');
								$('#codeInput').val('');
								return false;
							});
							break;
						case 'orderMethod':
							var params="m=account_find_order&order=" + order + "&verifycode=" + verifycode;
							var url = DOMAIN_AQ+'interface/account?' + params;

							$.getJSON(url+"&jsoncallback=?", function(json){
								f_submit3 = false;
								$.xlaq.closeTopTips();

								if (json.result) {    // 验证码错误
									if (json.result == 1206) {
										$('.code').after('<span class="warn" style="vertical-align:11px;">*' + ERROR_AQ[json.result] + '</span>');
									} else if (json.result == 404) {
										$.xlaq.showFormTips('orderInput', '*未找到相关的账号信息，请确保输入信息正确');
									} else if (json.result == 12) {
										$.xlaq.showFormTips('orderInput', '*服务器接收异常，请稍后重试');
									}
									getVerifyCode2('code');
									$('#codeInput').val('');
									return false;
								} else if (json.result == 0) {
									// 查询到账号, 则在页面上显示出来
									$('#wp_main1').hide();
									$('#wp_main2').hide();
									$('#wp_main3').show();
									$('#account_title').html('查询到您的订单号绑定的账号如下：');
									if (json.data.mobile) {
										$('#account').html(json.data.mobile);
									} else if (json.data.mail) {
										$('#account').html(json.data.mail);
									} else if (json.data.usrname) {
										$('#account').html(json.data.usrname);
									} else if (json.data.usernewno) {
										$('#account').html(json.data.usernewno);
									}
								}
								return false;
							});
							break;
						case 'orderPhoneMethod':
							var params="m=account_find_order_phone&phone=" + orderPhone + "&verifycode=" + verifycode;
							var url = DOMAIN_AQ+'interface/account?' + params;

							$.getJSON(url+"&jsoncallback=?", function(json){
								f_submit3 = false;
								$.xlaq.closeTopTips();

								if (json.result) {
									if (json.result == 1206) {
										$('.code').after('<span class="warn" style="vertical-align:11px;">*' + ERROR_AQ[json.result] + '</span>');
									} else if (json.result == 404) {
										$.xlaq.showFormTips('orderPhoneInput', '*未找到相关的账号信息，请确保输入手机号正确');
									} else if (json.result == 12) {
										$.xlaq.showFormTips('orderPhoneInput', '*服务器接收异常，请稍后重试');
									}
									getVerifyCode2('code');
									$('#codeInput').val('');
									return false;
								} else if (json.result == 0) {
									// 查询到账号, 则在页面上显示出来
									$('#wp_main1').hide();
									$('#wp_main2').hide();
									$('#wp_main3').show();
									$('#account_title').html('查询到您的付款手机绑定的账号如下：');
									if (json.data.mobile) {
										$('#account').html(json.data.mobile);
									} else if (json.data.mail) {
										$('#account').html(json.data.mail);
									} else if (json.data.usrname) {
										$('#account').html(json.data.usrname);
									} else if (json.data.usernewno) {
										$('#account').html(json.data.usernewno);
									}
								}

								return false;
							});
							break;
						default :
							break;
					}

				});
			}
		},

		//点击手机或邮箱输入框时，若有两个手机或邮箱，展示下拉框
		showDrop : function(type){
			if($.xlaq_acount._submit == 0){
				return;
			}

			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			if(type == 'mobile'){
				if(parseInt(C_AQINFO_ARY[2]) == 0) return;

				if($.xlaq_acount._aqMobile == 0 || $.xlaq_acount._bindMobile == 0){  //等于0表示还未从服务器拉取过数据
					var params="m=mobile_select";
					var url = DOMAIN_AQ+'interface/sms?'+params;
					$.xlaq_acount._submit = 0;
					$.getJSON(url+"&jsoncallback=?", function(json){
						$.xlaq_acount._submit = 1;
						if(json.result == 0){
							$.xlaq_acount._aqMobile = json.aqMobile;
							$.xlaq_acount._bindMobile = json.bindMobile;
							showDropDeal('mobile');
						}
					});
				}else{
					if($.xlaq_acount._aqMobile || $.xlaq_acount._bindMobile){
						showDropDeal('mobile');
					}
				}
			}else if(type == 'mail'){
				if(parseInt(C_AQINFO_ARY[1]) != 2) return;

				if($.xlaq_acount._aqMail == 0 || $.xlaq_acount._bindMail == 0){  //等于0表示还未从服务器拉取过数据
					var params="m=mail_select";
					var url = DOMAIN_AQ+'interface/mail?'+params;
					$.xlaq_acount._submit = 0;
					$.getJSON(url+"&jsoncallback=?", function(json){
						$.xlaq_acount._submit = 1;
						if(json.result == 0){
							$.xlaq_acount._aqMail = json.aqMail;
							$.xlaq_acount._bindMail = json.bindMail;
							showDropDeal('mail');
						}
					});
				}else{
					if($.xlaq_acount._aqMail || $.xlaq_acount._bindMail){
						showDropDeal('mail');
					}
				}
			}else{
				return;
			}
			function showDropDeal(type){
				if(type == 'mobile'){
					if($.xlaq_acount._aqMobile && $.xlaq_acount._bindMobile && $.xlaq_acount._aqMobile != $.xlaq_acount._bindMobile){
						$('.drop a:eq(0)').html($.xlaq_acount._aqMobile);
						$('.drop a:eq(1)').html($.xlaq_acount._bindMobile);
						$('.drop').show();
						$('.old_mobile').click(function(){
							var mobile = $(this).html();
							$('#mobile').val(mobile);
							$('.drop').hide();
						});
					}
				}else if(type == 'mail'){
					if($.xlaq_acount._aqMail && $.xlaq_acount._bindMail && $.xlaq_acount._aqMail != $.xlaq_acount._bindMail){
						$('.drop a:eq(0)').html($.xlaq_acount._aqMail);
						$('.drop a:eq(1)').html($.xlaq_acount._bindMail);
						$('.drop').show();
						$('.old_mail').click(function(){
							var mail = $(this).html();
							$('#mail').val(mail);
							$('.drop').hide();
						});
					}
				}

			}
		},

		//account_index.html页面初始化
		initAccountIndex: function() {
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			var C_M_INFO = unescape($.xlaq.getCookie("m_info"));
			var C_M_INFO_ARY = C_M_INFO.split("&");
			var highestCheckEvent = $.xlaq_acount.highestCheckEvent();

			//手机
			if(parseInt(C_AQINFO_ARY[2]) == 1) {
				//若手机已设置
				$('#part_2_mobile').attr('class','part_2');
				if(C_M_INFO_ARY[2] == C_M_INFO_ARY[3]){
					$('#part_2_mobile').html('<p>'+C_M_INFO_ARY[2]+'</p>');
				}else{
					$('#part_2_mobile').html('<p>'+C_M_INFO_ARY[2]+'</p><p>'+C_M_INFO_ARY[3]+'</p>');
				}

				$('.centre li:eq(1) a i').attr('class','ico_s ico_edit');
				$('.centre li:eq(1) a span').html('修改');
				$('.centre li:eq(1) a').attr({href:'/account_check.html?set=mobile&type=change',title:'修改'});
			} else {
				$('.centre li:eq(1) a').attr('href','/account_check.html?set=mobile&type=add');
			}


			//邮箱
			if(parseInt(C_AQINFO_ARY[1]) == 0) {
				//若邮箱未设置
				$('.centre li:eq(0) a').attr('href', '/account_check.html?set=mail&type=add');
			} else if(parseInt(C_AQINFO_ARY[1]) == 1){
				//若邮箱已设置
				$('#part_2_mail').attr('class','part_2 none');
				var mail = $.xlaq_acount.getHideAccount(C_M_INFO_ARY[0],'mail');
				$('#part_2_mail').html('<p>'+mail+'（未激活）</p>');
				$('.centre li:eq(0) a').attr({href:'/account_mail.html',title:'激活'});
				$('.centre li:eq(0) a i').attr('class','ico_s ico_edit');
				$('.centre li:eq(0) a span').html('激活');
			} else {
				//若邮箱已设置
				$('#part_2_mail').attr('class','part_2');
				if(C_M_INFO_ARY[0] == C_M_INFO_ARY[1]){
					$('#part_2_mail').html('<p>'+C_M_INFO_ARY[0]+'</p>');
				}else{
					$('#part_2_mail').html('<p>'+C_M_INFO_ARY[0]+'</p><p>'+C_M_INFO_ARY[1]+'</p>');
				}
				$('.centre li:eq(0) a').attr({href:'/account_check.html?set=mail&type=change',title:'修改'});
				$('.centre li:eq(0) a i').attr('class','ico_s ico_edit');
				$('.centre li:eq(0) a span').html('修改');
			}

			//密保
			if(parseInt(C_AQINFO_ARY[3]) == 1) {
				//若密保已设置
				$('#part_2_question').attr('class','part_2');
				$('#part_2_question').html('已设置');
				$('.centre li:eq(2) a').attr({href:'/account_check.html?set=question&type=change',title:'修改'});
				$('.centre li:eq(2) a i').attr('class','ico_s ico_edit');
				$('.centre li:eq(2) a span').html('修改');
			}else {
				$('.centre li:eq(2) a').attr('href', '/account_check.html?set=question&type=add');
			}

			//身份认证
			if(parseInt(C_AQINFO_ARY[4]) == 1) {
				//若身份认证已设置
				$('#part_2_idauth').attr('class','part_2');
				$('#part_2_idauth').html('已设置');
				$('.centre li:eq(3) a').attr('title','修改');
				$('.centre li:eq(3) a i').attr('class','ico_s ico_edit');
				$('.centre li:eq(3) a span').html('修改');
				$('.centre li:eq(3) a').click(function(){
					$.xlaq.confirm('您只能通过申诉来修改身份认证', 'window.open("http://ss.aq.xunlei.com")');
				});
			}else {
				$('.centre li:eq(3) a').attr('href', '/account_check.html?set=idauth&type=add');
			}
		},

		/*
		 *account_check.html页面初始化
		 *参数：set: mobile,mail,question,idauth ; type:本次操作是新增或修改，add:新增;change:修改 ; checkby:mobile,mail,question,password
		 */
		initAccountCheck: function(set,type,checkby){
			//加多了个checkby参数，需要对参数进行严格控制，防止用户自己填写url参数
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			var ary = $.xlaq_acount.validCheckEvent(set,type);
			if(!checkby){
				checkby = ary[0];  //若没有指定验证方式，则默认用最高级安全资料来验证
			}

			// 绑定点击弹出审核期提示事件
			$('.r_mobile').live('click',function(){
				$.xlaq.confirm('手机未通过审核期，暂不能用于修改安全资料');
			});
			$('.r_mail').live('click',function(){
				$.xlaq.confirm('邮箱未通过审核期，暂不能用于修改安全资料');
			});

			if(set == 'mobile' && type == 'add') {
				$('.step_2').html('2.设置新手机<i class="spr_a arw_2"></i>');
				var C_AQINFO = unescape($.xlaq.getCookie("m_info"));
				var C_AQINFO_ARY = C_AQINFO.split("&");
				var aqMail = C_AQINFO_ARY[0];
				var bindMail = C_AQINFO_ARY[1];
				var is_third_login = C_AQINFO_ARY[5];
				if( parseInt(is_third_login) ){
					location.href = '/account_mobile.html?code=1';
				}
				if( aqMail ){
					$.xlaq_acount.checkByMail(set);
				}else{
					$.getJSON(DOMAIN_AQ +"interface/question?m=validate_send&jsoncallback=?", function (c) {
						if( 0 == c.result ) {
							$.xlaq_acount.checkByQuestion(set)
						} else {
							$.xlaq_acount.checkByPassword(set);
						}
					});
				}
				return;
			}

			if(set == 'mobile' && type == 'change'){
				$('.step_2').html('2.设置新手机<i class="spr_a arw_2"></i>');
				if(C_AQINFO_ARY[2] == 1){
					$.xlaq_acount.checkByMobile(set);
				}
				return;
			}

			if(set == 'mail' && type == 'add') {
				$('.step_2').html('2.设置新邮箱<i class="spr_a arw_2"></i>');
				$.xlaq_acount.checkByPassword(set);
				return;
			}

			if(set == 'mail' && type == 'change') {
				$('.step_2').html('2.设置新邮箱<i class="spr_a arw_2"></i>');
				if($.inArray(checkby,ary) != -1){
					if(checkby == 'mobile'){
						$.xlaq_acount.checkByMobile(set);
					}
					if(checkby == 'mail'){
						$.xlaq_acount.checkByMail(set);
					}
					$.xlaq_acount.showOtherCheckEvent(set,type,checkby);
					return;
				}
			}

			if(set == 'question' && type == 'add') {
				$('.step_2').html('2.设置密保问题<i class="spr_a arw_2"></i>');
				$.xlaq_acount.checkByPassword(set);
				return;
			}

			if(set == 'question' && type == 'change'){
				$('.step_2').html('2.设置密保问题<i class="spr_a arw_2"></i>');
				if($.inArray(checkby,ary) != -1){
					if(checkby == 'mobile'){
						$.xlaq_acount.checkByMobile(set);
					}
					if(checkby == 'mail'){
						$.xlaq_acount.checkByMail(set);
					}
					if(checkby == 'question'){
						$.xlaq_acount.checkByQuestion(set);
					}
					$.xlaq_acount.showOtherCheckEvent(set,type,checkby);
					return;
				}
			}

			if(set == 'idauth' && type == 'add') {
				$('.step_2').html('2.设置身份认证<i class="spr_a arw_2"></i>');
				//若checkby在允许拿来验证的项目里
				if($.inArray(checkby,ary) != -1){
					if(checkby == 'password'){
						$.xlaq_acount.checkByPassword(set);
					}
					if(checkby == 'mobile'){
						$.xlaq_acount.checkByMobile(set);
					}
					if(checkby == 'mail'){
						$.xlaq_acount.checkByMail(set);
					}
					if(checkby == 'question'){
						$.xlaq_acount.checkByQuestion(set);
					}
					$.xlaq_acount.showOtherCheckEvent(set,type,checkby);
					return;
				}
			}

			$.xlaq.showTopTips('参数错误，页面初始化失败', 1);
			$.xlaq.closeTopTipsDelay(3);
		},

		//在页面底部展示其他可拿来验证的安全资料
		showOtherCheckEvent : function(set,type,checkby){
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			var ary = $.xlaq_acount.validCheckEvent(set,type);
			for(var i=0;i<ary.length;i++){
				if(ary[i] != checkby && ary[i] != 'password'){
					if(ary[i] == 'mail' && C_AQINFO_ARY[1] == 1){
						$('#wp_main_'+checkby+' .checkby_mail').click(function(){
							$.xlaq.confirm('您的邮箱还未激活，请先激活邮箱', 'location.href="/account_mail.html"');
						}).show();
					}else{
						$('#wp_main_'+checkby+' .checkby_'+ary[i]).attr('href','/account_check.html?set='+set+'&type='+type+'&checkby='+ary[i]).show();
					}
				}
			}
			// 修改邮箱，有手机且手机处于审核期
			if (set == 'mail' && type == 'change' && C_AQINFO_ARY[2] == 1 && C_AQINFO_ARY[13] == 1) {
				$('#wp_main_'+checkby+' .checkby_mobile').addClass('r_mobile').show();
				return;
			}
			// 修改密保/设置身份认证问题时
			if ((set == 'question' && type == 'change') || (set == 'idauth' && type == 'add')) {
				// 有手机且手机处于审核期
				if (C_AQINFO_ARY[2] == 1 && C_AQINFO_ARY[13] == 1) {
					$('#wp_main_'+checkby+' .checkby_mobile').addClass('r_mobile').show();
				}
				// 有邮箱且邮箱处于审核期
				if (C_AQINFO_ARY[1] == 2 && C_AQINFO_ARY[12] == 1) {
					$('#wp_main_'+checkby+' .checkby_mail').addClass('r_mail').show();
				}
				return;
			}
		},

		//用手机进行安全资料的验证
		checkByMobile : function(type){
			$('#wp_main_mobile').show();
			$('#wp_main_mobile .mobile_li').html('<li><span class="">获取中...</span></li>');
			var M_INFO = unescape($.xlaq.getCookie("m_info"));
			var M_INFO_ARY = M_INFO.split("&");
			var aqMobile = M_INFO_ARY[2];
			var bindMobile = M_INFO_ARY[3];

			if(aqMobile && bindMobile && aqMobile != bindMobile){
				$('#wp_main_mobile .mobile_li').html('<li id="mobile_li_1"><input id="mobile_li_input_1" type="radio" name="number" checked /> <span id="mobile_li_span_1" class="cho">'+aqMobile+'</span></li><li id="mobile_li_2"><input id="mobile_li_input_2" type="radio" name="number" /> <span id="mobile_li_span_2">'+bindMobile+'</span></li>');
				//点击手机列表选中手机
				$('#wp_main_mobile .mobile_li li').click(function(){
					var index = $(this).attr('id').substring(10);
					if(parseInt(index) == 1){
						$('#mobile_li_input_1').attr('checked','checked');
						$('#mobile_li_span_1').attr('class','cho');
						$('#mobile_li_input_2').attr('checked','');
						$('#mobile_li_span_2').attr('class','');
					}else{
						$('#mobile_li_input_1').attr('checked','');
						$('#mobile_li_span_1').attr('class','');
						$('#mobile_li_input_2').attr('checked','checked');
						$('#mobile_li_span_2').attr('class','cho');
					}
				});
				//点击获取短信验证码
				$('#getcode').click(function(){
					var mobile = $('#wp_main_mobile .cho').html();
					$.xlaq_acount.getMobileCode(mobile,1,type);
				});
				// 点击按钮提交手机验证码验证
				$('#mobile_btn').click(function(){
					var mobile = $('#wp_main_mobile .cho').html();
					var code = $.trim($('#sms_code').val());
					if(code == '' || code.length != 6) {
						$.xlaq.showFormTips('sms_code', '*请输入6位短信验证码');
						return false;
					}
					$.xlaq_acount.checkMobileCode(mobile,code,type,1);
				});
			}else if(aqMobile || bindMobile){
				var mobile = (aqMobile)?aqMobile:bindMobile;
				$('#wp_main_mobile .mobile_li').html('<li><span class="cho">'+mobile+'</span></li>');
				//点击获取短信验证码
				$('#getcode').click(function(){
					$.xlaq_acount.getMobileCode(mobile,1,type);
				});
				// 提交手机验证码验证
				$('#mobile_btn').click(function(){
					$.xlaq.closeFormTips();
					var code = $.trim($('#sms_code').val());
					if(code == '' || code.length != 6) {
						$.xlaq.showFormTips('sms_code', '*请输入6位短信验证码');
						return false;
					}
					$.xlaq_acount.checkMobileCode(mobile,code,type,1);
				});
			}else{
				$('#wp_main_mobile .mobile_li').html('<li><span class="">获取失败</span></li>');
				$.xlaq.showTopTips('您还未设置手机', 1);
				$.xlaq.closeTopTipsDelay(3);
			}
		},

		//用邮箱进行安全资料的验证,type：本次操作要修改的对象，mobile,mail,question,idauth
		checkByMail : function(type){
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			if(C_AQINFO_ARY[1] == 1){
				$.xlaq.confirm('您的邮箱还未激活，请先激活邮箱', 'location.href="/account_mail.html"', 'location.href="/account_index.html"', 'location.href="/account_index.html"');
				return;
			}
			$('#wp_main_mail').show();
			$('#wp_main_mail .mail_li').html('<li><span>获取中...</span></li>');
			var M_INFO = unescape($.xlaq.getCookie("m_info"));
			var M_INFO_ARY = M_INFO.split("&");
			var aqMail = M_INFO_ARY[0];
			var bindMail = M_INFO_ARY[1];

			if(aqMail && bindMail && aqMail != bindMail){
				$('#wp_main_mail .mail_li').html('<li id="mail_li_1"><input id="mail_li_input_1" type="radio" name="email" checked /> <span id="mail_li_span_1" class="cho">'+aqMail+'</span></li><li id="mail_li_2"><input id="mail_li_input_2" type="radio" name="email" /> <span id="mail_li_span_2">'+bindMail+'</span></li>');
				//点击邮箱列表选中邮箱
				$('#wp_main_mail .mail_li li').click(function(){
					var index = $(this).attr('id').substring(8);
					if(parseInt(index) == 1){
						$('#mail_li_input_1').attr('checked','checked');
						$('#mail_li_span_1').attr('class','cho');
						$('#mail_li_input_2').attr('checked','');
						$('#mail_li_span_2').attr('class','');
					}else{
						$('#mail_li_input_1').attr('checked','');
						$('#mail_li_span_1').attr('class','');
						$('#mail_li_input_2').attr('checked','checked');
						$('#mail_li_span_2').attr('class','cho');
					}
				});
				//点击发送验证邮件
				$('#wp_main_mail .btn_nor').click(function(){
					var mail = $('#wp_main_mail .ver_con span[class=cho]').html();
					$.xlaq_acount.sendMail(mail,type);  //发送验证邮件
				});

			}else if(aqMail || bindMail){
				var mail = (aqMail)?aqMail:bindMail;
				//$('#wp_main_mail .ver_con').html('<li><span class="cho">'+mail+'</span></li>');
				$('#wp_main_mail .mail_li').html('<li><span class="cho">'+mail+'</span></li>');
				//点击发送验证邮件
				$('#wp_main_mail .btn_nor').click(function(){
					$.xlaq_acount.sendMail(mail,type);  //发送验证邮件
				});
			}else{
				$('#wp_main_mail .ver_con').html('<li><span>获取失败</span></li>');
				$.xlaq.showTopTips('您还未设置邮箱', 1);
				$.xlaq.closeTopTipsDelay(3);
				return;
			}
		},

		//用密保进行安全资料的验证,type：本次操作要修改的对象，mobile,mail,question,idauth
		checkByQuestion : function(type){
			$('#wp_main_question').show();
			var params = "m=validate_send";
			var url = DOMAIN_AQ+'interface/question?'+params;
			$('#question').html('获取中...');
			var f_submit = true;
			//获取用户已设置过的密保问题
			$.getJSON(url+"&jsoncallback=?", function(json){
				if(json.result == 0){
					$('#question').html(json.data.que);
					f_submit = false;
					$('#wp_main_question .btn_nor').click(function(){
						if(f_submit) return;

						$.xlaq.closeFormTips();
						var answer = $('#answer').val();
						if(!answer){
							$.xlaq.showFormTips('answer','*答案不能为空');
							return;
						}
						if(!$.xlaq_acount.validAnswer(answer)){
							$.xlaq.showFormTips('answer','*答案格式错误');
							return;
						}
						params="m=validate_check&ans="+$.md5($.md5(answer))+"&que="+$.md5($.md5((json.data.que)))+'&type='+type;
						url = DOMAIN_AQ+'interface/question?'+params;
						$.getJSON(url+"&jsoncallback=?", function(json2){
							f_submit = false;
							if(json2.result == 0){
                                if(type=='common_login'){
                                    location.href = '/common_login_modify.html?code=1';
                                }else{
                                    location.href = '/account_'+type+'.html';
                                }
							}else{
								$.xlaq.showFormTips('answer','*'+ERROR_AQ[json2.result]);
							}
						});
					});
				}else{
					$('#question').html('获取失败');
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(3);
				}
			});
		},

		//用密码进行安全资料的验证,type：本次操作要修改的对象，mobile,mail,question,idauth
		checkByPassword : function(type){
			$('#wp_main_password').show();
			var f_submit = false;
			$('#wp_main_password .btn_nor').click(function(){
				if(f_submit) return;

				$('#psw_warn').hide();
				$('#psw2_warn').hide();
				var psw = $('#password').val();
				var psw2 = $('#password2').val();
				if(psw.length == ''){
					$('#psw_warn').html('*请输入密码').show();
					return;
				}else if(psw.length < 6){
					$('#psw_warn').html('*密码太短了，至少要6位哦').show();
					return;
				}else if(psw.length > 16){
					$('#psw_warn').html('*密码太长了，最多16位哦').show();
					return;
				}else if(psw2 == ''){
					$('#psw2_warn').html('*请输入确认密码').show();
					return;
				}else if(psw != psw2){
					$('#psw2_warn').html('*两次输入密码不一致').show();
					return;
				}
				psw = $.md5(psw);
				var url = DOMAIN_AQ+'interface/account?m=validate_check';
				var data = {psw:psw, type:type};
				f_submit = true;
				var ct = new Date().getTime();
				$.xlaq.iframePost(url, data, ct, function(){
					f_submit = false;
					var json = $.xlaq.getPostResponse(ct);
					if(json.result == 0){
						location.href = '/account_'+type+'.html';
					}else{
						$('#psw_warn').html('*'+ERROR_AQ[json.result]).show();
					}
				});

			});
		},

		//验证短信验证码,type：本次操作要修改的对象，mobile,mail,question,idauth;type2=1:验证安全资料时,type2=2:修改手机时
		checkMobileCode : function(mobile,code,type,type2){
			if($.xlaq_acount._submit == 0) return;

			$.xlaq.showTopTips('正在验证中，请稍候...');
			$.xlaq.closeFormTips();
			var params = '';
			if(type2 == 1){
				params="m=validate_check&code="+code+"&mobile="+mobile;
			}else{
				params="m=set_check&code="+code+"&mobile="+mobile;
			}
			var url = DOMAIN_AQ+'interface/sms?'+params;
			$.xlaq_acount._submit = 0;
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq_acount._submit = 1;
				$.xlaq.closeTopTips();
				if(json.result == 0) {
					if(type2 == 1){
						if(type=='common_login'){
							location.href = '/common_login_modify.html?code=1';
						}else{
							location.href = '/account_'+type+'.html';
						}
					}else{
						$('#wp_main_mobile').hide();
						$('#wp_main_mobile2').show();
						var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
						var C_AQINFO_ARY = C_AQINFO.split("&");
						var score = parseInt(C_AQINFO_ARY[0]);
						if(C_AQINFO_ARY[2] == 0){
							score = score + 10;
						}
						$.xlaq_acount.showAqLevel('wp_main_mobile2',score);
						$.xlaq.setAqCookie('aq_info', '');
					}
					return false;
				}
				if(json.result == 6002) {
					$.xlaq.showFormTips('has_drop', '*对不起，该手机已绑定到其他帐号  <a href="/password_find.html" target="_blank">点此找回该帐号>></a>');
				} else {
					$.xlaq.showFormTips('sms_code', '*'+ERROR_AQ[json.result]);
					return false;
				}
			});
		},

		//获取短信验证码,type=1:验证安全资料时,type=2:修改手机时; type2：本次操作要修改的对象，mobile,mail,question,idauth(因后续统计需求，加多这个参数)
		getMobileCode : function(mobile,type,type2){
			if($.xlaq_acount._submit == 0) return;

			$.xlaq.showTopTips('正在发送短信，请稍候...');
			$('#getcode').hide();
			$('#r_getcode').show();
			//59s后重新发送
			window.s = 59;
			$('#r_getcode span').html(window.s);
			window.t = setInterval(function(){
				window.s--;
				if(window.s == 0){
					$('#getcode').show();
					$('#r_getcode').hide();
					clearInterval(window.t);
				}else{
					$('#r_getcode span').html(window.s);
				}
			},1000);

			var params = '';
			if(type == 1){
				params="m=validate_send&mobile="+mobile+"&type="+type2;
			}else{
				params="m=set_send&mobile="+mobile;
			}
			var url = DOMAIN_AQ+'interface/sms?'+params;

            $.xlaq_acount._submit = 0;
            $.getJSON(url + "&jsoncallback=?", function (b) {
                $.xlaq_acount._submit = 1;
                    $.xlaq.closeTopTips();
                if(0 == b.result) {
                    $.xlaq.showTopTips("验证码已发送，请注意查收您的手机短信");
                }else{
                    if(3005 == b.result || 6 == b.result){
                        $("#getcode").show();
                        $("#r_getcode").hide();
                        clearInterval(window.t);
                    }
                    if(6002 == b.result){
                        $.xlaq.showFormTips("has_drop", '*对不起，该手机已绑定到其他帐号  <a href="/password_find.html" target="_blank">点此找回该帐号>></a>') ;
						$("#getcode").show();
						$("#r_getcode").hide();
						clearInterval(window.t);
                    }else{
                        $.xlaq.showTopTips(ERROR_AQ[b.result], 1);
                        $.xlaq.closeTopTipsDelay(5);
						$("#getcode").show();
						$("#r_getcode").hide();
                    }
                }
            });
        },

		//验证安全资料时发送验证邮件
		sendMail : function(mail,type,isResend){
			if($.xlaq_acount._submit == 0) return;

			var params = '';
			if(isResend == 1){
				params = 'm=validate_resend&type='+type+'&mail='+mail;
			}else{
				params = 'm=validate_send&type='+type+'&mail='+mail;
			}
			var url = DOMAIN_AQ+'interface/mail?'+params;
			$.xlaq.showTopTips('正在发送中，请稍候...');
			$.xlaq_acount._submit = 0;

			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq_acount._submit = 1;
				if(json.result == 0){
					$.xlaq.closeTopTipsDelay();
					$('#wp_main_mail').hide();
					$('#wp_main_mail_2').show();
					$('#wp_main_mail_2 .txt_b').html(mail);
					$('#has_send_mail').html(mail);
					if(isResend == 1){
						$('#wp_main_mail_2 .verify p:eq(2)').hide();
						$('#wp_main_mail_2 .verify p:eq(3)').show();
						$('#wp_main_mail_2 .btn_re').attr('href',json.data.mail_url);
						setTimeout(function(){
							$('#wp_main_mail_2 .verify p:eq(2)').show();
							$('#wp_main_mail_2 .verify p:eq(3)').hide();
						},5000);
					}else{
						$('#wp_main_mail_2 .verify p:eq(2)').show();
						$('#wp_main_mail_2 .verify p:eq(3)').hide();
						$('#wp_main_mail_2 .btn_nor').attr('href',json.data.mail_url);
						$('#mail_resend').click(function(){
							var mail = $('#has_send_mail').html();
							$.xlaq_acount.sendMail(mail,type,1);  //重新发送验证邮件
						});
					}
				}else{
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(3);
				}
			});
		},

		//重置邮箱时发送验证邮件
		sendMail2 : function(mail,isResend,code){

			if($.xlaq_acount._submit == 0) return;

			var params = '';
			if(isResend == 1){
				params = "m=set_resend&mail="+mail;
			}else{
				params = "m=set_send&verifycode="+code+"&mail="+mail;
			}
			var url = DOMAIN_AQ+'interface/mail?'+params;
			$.xlaq.closeFormTips();
			$.xlaq.showTopTips('正在发送中，请稍候...');
			$.xlaq_acount._submit = 0;
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq_acount._submit = 1;
				$.xlaq.closeTopTips();
				if(json.result == 0) {
					$('#wp_main_mail').hide();
					$('#wp_main_mail3').show();
					$('#wp_main_mail3 .txt_b').html(mail);
					$('#wp_main_mail3 .btn_nor').attr('href',json.data.mail_url);
					if(isResend == 1){
						$('#has_resend a').attr('href',json.data.mail_url);
						$('#check_mail').hide();
						$('#has_resend').show();
						setTimeout(function(){
							$('#check_mail').show();
							$('#has_resend').hide();
						},5000);
					}else{
						//绑定重发邮件事件
						$('#resend').unbind();
						$('#resend').click(function(){
							$.xlaq_acount.sendMail2(mail,1);
						});
					}
				} else if(json.result == 1006){
					getVerifyCode2('code');
					$('#codeInput').val('');
					$('#code').after('<span class="warn" style="vertical-align:11px;"> *验证码错误，请重新输入</span>');
				} else if(json.result == 6001){
					getVerifyCode2('code');
					$('#codeInput').val('');
					$.xlaq.showFormTips('has_drop', '*对不起，该邮箱已绑定到其他帐号  <a href="/password_find.html" target="_blank">点此找回该帐号>></a>');
				} else{
					getVerifyCode2('code');
					$('#codeInput').val('');
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(3);
					return false;
				}
			});
		},

		//激活邮箱时发送验证邮件
		sendMail3 : function(isResend){
			if($.xlaq_acount._submit == 0) return;

			var params = '';
			if(isResend == 1){
				params = 'm=activate_resend';
			}else{
				params = 'm=activate_send';
			}
			var url = DOMAIN_AQ+'interface/mail?'+params;
			$.xlaq.showTopTips('正在发送中，请稍候...');
			$.xlaq_acount._submit = 0;
			//获取用户未激活邮箱
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq_acount._submit = 1;
				$.xlaq.closeTopTips();
				if(json.result == 0){
					$('#wp_main_mail2').hide();
					$('#wp_main_mail3').show();
					$('#wp_main_mail3 .txt_b').html(json.data['mail']);
					$('#wp_main_mail3 .btn_nor').attr('href',json.data.mail_url);
					if(isResend == 1){
						$('#has_resend a').attr('href',json.data.mail_url);
						$('#check_mail').hide();
						$('#has_resend').show();
						setTimeout(function(){
							$('#check_mail').show();
							$('#has_resend').hide();
						},5000);
					}else{
						$('#resend').click(function(){
							$.xlaq_acount.sendMail3(1);
						});
					}
				}else{
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(3);

				}
			});
		},

        // 全国各省市
        CITYS : {
            "A-安徽":"A-安庆|B-亳州|B-蚌埠|C-巢湖|C-池州|C-滁州|F-阜阳|H-合肥|H-淮北|H-淮南|H-黄山|L-六安|M-马鞍山|S-宿州|T-铜陵|W-芜湖|X-宣城",
            "A-澳门":"A-澳门",
            //"B-北京":"C-朝阳|C-崇文|C-昌平|D-东城|D-大兴|F-丰台|F-房山|H-怀柔|H-海淀|M-密云|M-门头沟|P-平谷|S-石景山|S-顺义|T-通州|X-宣武|X-西城|Y-延庆",
            "B-北京":"B-北京",
            //"C-重庆":"B-北碚|B-壁山|B-巴南|C-城口|C-长寿|D-垫江|D-大渡口|D-大足|F-丰都|F-奉节|F-涪陵|H-合川|J-九龙坡|J-江北|J-江津|K-开县|L-梁平|N-南岸|N-南川|P-彭水|Q-綦江|Q-黔江|R-荣昌|S-双挢|S-沙坪坝|S-石柱|T-潼南|T-铜梁|W-万州|W-万盛|W-巫山|W-巫溪|W-武隆|X-秀山|Y-云阳|Y-永川|Y-渝中|Y-渝北|Y-酉阳|Z-忠县",
            "C-重庆":"C-重庆",
            "F-福建":"F-福州|L-龙岩|N-南平|N-宁德|P-莆田|Q-泉州|S-三明|X-厦门|Z-漳州",
            "G-广东":"C-潮州|D-东莞|F-佛山|G-广州|H-惠州|H-河源|J-揭阳|J-江门|M-梅州|M-茂名|Q-清远|S-汕头|S-汕尾|S-深圳|S-韶关|Y-云浮|Y-阳江|Z-中山|Z-湛江|Z-珠海|Z-肇庆",
            "G-广西":"B-北海|B-百色|F-防城港|G-桂林|G-贵港|H-河池|H-贺州|L-柳州|L-柳州地区|N-南宁|N-南宁地区|Q-钦州|W-梧州|Y-玉林",
            "G-甘肃":"B-白银|D-定西|G-甘南|J-嘉峪关|J-酒泉|J-金昌|L-临夏|L-兰州|L-陇南|P-平凉|Q-庆阳|T-天水|W-武威|Z-张掖",
            "G-贵州":"A-安顺|B-毕节|G-贵阳|L-六盘水|Q-黔东南|Q-黔南|Q-黔西南|T-铜仁|Z-遵义",
            "H-河北":"B-保定|C-承德|C-沧州|H-衡水|H-邯郸|L-廊坊|Q-秦皇岛|S-石家庄|T-唐山|X-邢台|Z-张家口",
            "H-河南":"A-安阳|H-鹤壁|J-济源|J-焦作|K-开封|L-洛阳|N-南阳|P-平顶山|P-濮阳|S-三门峡|S-商丘|T-漯河|X-信阳|X-新乡|X-许昌|Z-周口|Z-郑州|Z-驻马店",
            "H-海南":"H-海口|S-三亚",
            "H-湖北":"E-恩施|E-鄂州|H-黄冈|H-黄石|J-荆州|J-荆门|Q-潜江|S-十堰|S-随州|T-天门|W-武汉|X-仙桃|X-咸宁|X-孝感|X-襄樊|Y-宜昌",
            "H-湖南":"C-长沙|C-常德|C-郴州|H-怀化|H-衡阳|L-娄底|S-邵阳|X-湘潭|X-湘西|Y-岳阳|Y-永州|Y-益阳|Z-张家界|Z-株洲",
            "H-黑龙江":"D-大兴安岭|D-大庆|H-哈尔滨|H-鹤岗|H-黑河|J-佳木斯|J-鸡西|M-牡丹江|Q-七台河|Q-齐齐哈尔|S-双鸭山|S-绥化|Y-伊春",
            "J-吉林":"B-白城|B-白山|C-长春|J-吉林|L-辽源|S-四平|S-松原|T-通化|Y-延边",
            "J-江苏":"C-常州|H-淮安|L-连云港|N-南京|N-南通|S-宿迁|S-苏州|T-泰州|W-无锡|X-徐州|Y-扬州|Y-盐城|Z-镇江",
            "J-江西":"F-抚州|G-赣州|J-九江|J-吉安|J-景德镇|N-南昌市|P-萍乡|S-上饶|X-新馀|Y-宜春|Y-鹰潭",
            "L-辽宁":"A-鞍山|B-本溪|C-朝阳|D-丹东|D-大连|F-抚顺|F-阜新|H-葫芦岛|J-锦州|L-辽阳|P-盘锦|S-沈阳|T-铁岭|Y-营口",
            "N-内蒙古":"A-阿拉善盟|B-包头|B-巴彦淖尔盟|C-赤峰|H-呼伦贝尔盟|H-呼和浩特|W-乌兰察布盟|W-乌海|X-兴安盟|X-锡林郭勒盟|Y-伊克昭盟|Z-哲里木盟",
            "N-宁夏":"G-固原|S-石嘴山|W-吴忠|Y-银川",
            "Q-青海":"G-果洛|H-海东|H-海北|H-海南|H-海西|H-黄南|X-西宁|Y-玉树",
            //"S-上海":"B-宝山|C-崇明|C-长宁|F-奉贤|H-黄浦|J-嘉定|J-虹口|J-金山|J-静安|L-卢湾|M-闵行|N-南汇|P-普陀|P-浦东|Q-青浦|S-松江|X-徐汇|Y-杨浦|Z-闸北",
            "S-上海":"S-上海",
            "S-四川":"C-成都|D-德阳|D-达川|G-广元|G-广安|G-甘孜|L-凉山|L-泸州|M-眉山|M-绵阳|N-内江|N-南充|P-攀枝花|S-遂宁|Y-乐山|Y-宜宾|Y-雅安|Z-自贡",
            "S-山东":"B-滨州|D-东营|D-德州|H-菏泽|J-济南|J-济宁|L-临沂|L-聊城|L-莱芜|Q-青岛|R-日照|T-泰安|W-威海|W-潍坊|Y-烟台|Z-枣庄|Z-淄博",
            "S-山西":"C-长治|D-大同|J-晋中|J-晋城|L-临汾|L-吕梁|S-朔州|T-太原|X-忻州|Y-运城|Y-阳泉",
            "S-陕西":"A-安康|B-宝鸡|H-汉中|S-商洛|T-铜川|W-渭南|X-咸阳|X-西安|Y-延安|Y-榆林",
            "T-台湾":"G-高雄|H-花莲|J-嘉义|J-基隆|J-金门|M-苗栗|M-马祖|N-南投|P-屏东|P-澎湖|T-台东|T-台中|T-台北|T-台南|T-桃园|X-新竹|Y-云林|Y-宜兰|Z-彰化",
            //"T-天津":"B-北辰|B-宝坻|D-东丽|D-大港|H-和平|H-汉沽|H-河东|H-河北|H-河西|H-红挢|J-津南|J-蓟县|J-静海|N-南开|N-宁河|T-塘沽|W-武清|X-西青",
            "T-天津":"T-天津",
            "X-新疆":"A-阿克苏|B-博尔塔拉|B-巴音郭勒|C-昌吉|H-和田|H-哈密|K-克孜勒苏柯尔克孜|K-克拉玛依|K-喀什|S-石河子|T-吐鲁番|W-乌鲁木齐|Y-伊犁",
            "X-西藏":"A-阿里|C-昌都|L-拉萨|L-林芝|N-那曲|R-日喀则|S-山南",
            "X-香港":"X-香港",
            "Y-云南":"B-保山|C-楚雄|D-大理|D-德宏|D-迪庆|H-红河|K-昆明|L-临沧|L-丽江|N-怒江|Q-曲靖|S-思茅|W-文山|X-西双版纳|Y-玉溪|Z-昭通",
            "Z-浙江":"H-杭州|H-湖州|J-嘉兴|J-金华|L-丽水|N-宁波|Q-衢州|S-绍兴|T-台州|W-温州|Z-舟山"
        },

        //激活邮箱时发送验证邮件
        sendMail769 : function(isResend){
            if($.xlaq_acount._submit == 0) return;
            var params = '';
            if(isResend == 1){
                params = 'm=activate_resend';
            }else{
                params = 'm=activate_send';
            }
            var url = DOMAIN_AQ+'interface/mail?'+params;
            //获取用户未激活邮箱
            $.getJSON(url+"&jsoncallback=?", function(json){
                    $('#actMailSend').html('发送验证邮件');
                    if(json.result == 0){
                        $('#success_show').show();
                        $('#beforesend').hide();
                        if(isResend==1){
                            $.xlaq_acount.showmsg769('发送成功！');
                        }
                    }else{
                        $.xlaq_acount.showmsg769(ERROR_AQ[json.result]);
                    }
                $('#actMailSend').click(function(){
                    $(this).html('发送中...');
                    $.xlaq_acount.sendMail769();
                    $(this).unbind('click');
                });
            });
        },

        //引导激活的错误提示
        showmsg769:function(msg){
            $('#mistake_show_box').html(msg).show();
            window.setTimeout(function(){
                $('#mistake_show_box').html('').hide();
            },2500);
        },
		
		//获取隐藏处理后的邮箱或手机或身份信息
		getHideAccount : function(str,type){
			var result = '';
			if(type == 'mobile'){
				result = str.substr(0,3)+'*****'+str.substr(8);
			}else if(type == 'mail'){
				var index = str.indexOf('@');
				result = str.charAt(0)+'****'+str.charAt(index-1)+str.substr(index);
			}else if(type == 'idauth'){
				result = str.substr(0,4)+'**********'+str.substr(14);
			}
			return result;
		},

		//设置安全资料成功后，展示当前安全等级
		showAqLevel : function(id,score){
			if(score < 50){
				$('#'+id+' .passtype').attr('class','passtype low');
				$('#'+id+' .passtype i:eq(0)').attr('class','tpbg');
				$('#'+id+' .passtype em').html('极低');
			}else if(score >= 50 && score < 70){
				$('#'+id+' .passtype').attr('class','passtype mid');
				$('#'+id+' .passtype i:eq(0)').attr('class','tpbg');
				$('#'+id+' .passtype i:eq(1)').attr('class','tpbg');
				$('#'+id+' .passtype em').html('中');
			}else if(score >= 70){
				$('#'+id+' .passtype').attr('class','passtype max');
				$('#'+id+' .passtype i:eq(0)').attr('class','tpbg');
				$('#'+id+' .passtype i:eq(1)').attr('class','tpbg');
				$('#'+id+' .passtype i:eq(2)').attr('class','tpbg');
				$('#'+id+' .passtype em').html('高');
			}
		},

		goUpdatePage: function() {
			if($.xlaq.request('set') == 'mobile' && $(".wp_cont:eq(0)").is(":visible")) {
				location.href='/account_'+$.xlaq.request('set')+'.html?t=mobile';
			} else {
				location.href='/account_'+$.xlaq.request('set')+'.html';
			}
		},

		goAccountPage: function() {
			if(!$.xlaq.checkLogin()) {
				location.href='/index.html';
			} else {
				location.href='/account_index.html';
			}
		},
		//获取用户当前可拿来验证的最高级的安全资料,返回mobile,mail,question,password
		highestCheckEvent : function(){
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");
			if(C_AQINFO_ARY[2] == 1){
				return 'mobile';
			}else if(C_AQINFO_ARY[1] == 2){
				return 'mail';
			}else if(C_AQINFO_ARY[3] == 1){
				return 'question';
			}else{
				return 'password';
			}
		},
		//获取用户可拿来验证的安全资料
		validCheckEvent : function(set,type){
			var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
			var C_AQINFO_ARY = C_AQINFO.split("&");

			if(set == 'mobile' && type == 'add'){
				var ary = ['password'];
				return ary;
			}
			if(set == 'mobile' && type == 'change'){
				var ary = ['mobile'];
				return ary;
			}
			if(set == 'mail' && type == 'add'){
				var ary = ['password'];
				return ary;
			}
			if(set == 'mail' && type == 'change'){
				if(C_AQINFO_ARY[2] == 1 && C_AQINFO_ARY[13] == 0){
					var ary = ['mobile','mail'];
					return ary;
				}else{
					var ary = ['mail'];
					return ary;
				}
			}
			if(set == 'question' && type == 'add'){
				var ary = ['password'];
				return ary;
			}
			if(set == 'question' && type == 'change'){
				var ary = [];
				if(C_AQINFO_ARY[2] == 1 && C_AQINFO_ARY[13] == 0){
					ary.push('mobile');
				}
				if(C_AQINFO_ARY[1] == 2 && C_AQINFO_ARY[12] == 0){
					ary.push('mail');
				}
				if(C_AQINFO_ARY[3] == 1){
					ary.push('question');
				}
				if(C_AQINFO_ARY[1] == 1){
					ary.push('mail');  //若邮箱未激活，且为当前最高级安全资料，则不能作为默认展示的验证方式，只能出现在其他验证方式那里，点击提示用户去激活
				}
				return ary;
			}
			if(set == 'idauth' && type == 'add'){
				var ary = [];
				if(C_AQINFO_ARY[2] == 1 && C_AQINFO_ARY[13] == 0){
					ary.push('mobile');
				}
				if(C_AQINFO_ARY[1] == 2 && C_AQINFO_ARY[12] == 0){
					ary.push('mail');
				}
				if(C_AQINFO_ARY[3] == 1){
					ary.push('question');
				}
				if(C_AQINFO_ARY[1] == 1){
					ary.push('mail');  //若邮箱未激活，且为当前最高级安全资料，则不能作为默认展示的验证方式，只能出现在其他验证方式那里，点击提示用户去激活。但若连密保都没有，则只能让邮箱作为默认验证方式，强制提示用户激活
				}
				if(ary.length == 0){
					ary.push('password');
				}
				return ary;
			}
		},
		validAnswer: function(s) {
			var patrn = /^[a-zA-Z0-9\-\_\u4E00-\u9FA5]+$/g;
			if(!patrn.exec(s)) {
				return false;
			}
			return true;
		},
		validMobile: function(m) {
			var patrn = /^(13|14|15|17|18)[\d]{9}$/;
			if (!patrn.exec(m)) {
				return false;
			}
			return true;
		},
		validMail: function(m) {
			var patrn = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
			if (!patrn.exec(m)) {
				return false;
			}
			return true;
		},
		validTruename: function(s) {
			var patrn = /^[a-zA-Z0-9\-\_\u4E00-\u9FA5]+$/g;
			if(!patrn.exec(s)) {
				return false;
			}
			return true;
		},
		validIdno: function(m) {
			var patrn = /^[1-9]{1}[0-9]{16}[0-9|X]{1}$/gi;
			if(!patrn.exec(m)) {
				return false;
			}
			return true;
		},
		last: function() {

		}
	};
})(jQuery);

jQuery(document).ready(function (){
	if(!isUndef(menuno)) {
		var index = menuno%10 - 1 ;
		$('.nav li:eq('+index+')').addClass('on');
	}
	var C_SESSIONID = $.xlaq.getCookie('sessionid');
	var C_USERID = $.xlaq.getCookie("userid");
	var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
	var C_AQINFO_ARY = new Array();
	if(C_AQINFO!='') {
		C_AQINFO_ARY = C_AQINFO.split("&");
		if(C_AQINFO_ARY[5] != C_USERID) {
			$.xlaq.setAqCookie('aq_info', '');
			C_AQINFO = '';
		}
	}
	if(menuno == 13 && $.xlaq.request('mail')!='' && $.xlaq.request('code')!='') {
		$('.note').hide();
		$('.verify').hide();
		$.xlaq.showTopTips('正在验证中，请稍候...');
		if($.xlaq.request('type')=='mail') {
			//验证"验证安全资料发送邮件"中的验证码
			var params="m=validate_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail')+"&type="+$.xlaq.request('type');
			var url = DOMAIN_AQ+'interface/mail?'+params;
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq.closeTopTips();
				if(json.result == 0) {
					$('.note').show();
					$('.verify').show();
					$.xlaq_acount.initAccount(json.data);
				} else if(json.result == 3 || json.result == 4002 || json.result == 4003 || json.result == 4003 || json.result == 4004) {
					$('#wp_main_error').show();
					$('.xx_xgmi span').html(ERROR_AQ[json.result]);
				} else {
					$('#wp_main_error').show();
					$('.xx_xgmi span').html(ERROR_AQ[json.result]);
				}
			});
		} else {
			//验证"重置或激活邮箱发送邮件"中的验证码
			if($.xlaq.request('type')=='activate'){
				//激活邮箱
				var params="m=activate_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail');
			}else{
				//重置邮箱
				var params="m=set_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail');
			}

			var url = DOMAIN_AQ+'interface/mail?'+params;
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq.closeTopTips();
				if(json.result == 0) {
					$.xlaq.setAqCookie('aq_info', '');
					$('#wp_main_mail').hide();
					$('#wp_main_mail2').hide();
					$('#wp_main_mail4').show();
					$('.verify').show();
					var score = json.data.score;
					$.xlaq_acount.showAqLevel('wp_main_mail4',score);
					if($.xlaq.request('type')=='activate'){
						$('#wp_main_mail4 .step_2').html('2.激活邮箱<i class="spr_a arw_2"></i>');
						$('#wp_main_mail4 .success p:eq(0)').html('恭喜您，邮箱激活成功！');
					}
				}else {
					$('#wp_main_error').show();
					$('.xx_xgmi span').html(ERROR_AQ[json.result]);
				}
			});

		}
	} else if(menuno == 23 && $.xlaq.request('mail')!='' && $.xlaq.request('code')!='') {

		$('.note').hide();
		$('#wp_main_question').hide();
		$.xlaq.showTopTips('正在验证中，请稍候...');
		var params="m=validate_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail')+"&type="+$.xlaq.request('type');
		var url = DOMAIN_AQ+'interface/mail?'+params;
		$.getJSON(url+"&jsoncallback=?", function(json){
			$.xlaq.closeTopTips();
			if(json.result == 0) {
				$('.note').show();
				$('#wp_main_question').show();
				$.xlaq_acount.initAccount();
			} else {
				$('.xx_xgmi span').html(ERROR_AQ[json.result]);
				$('#wp_main_error').show();
			}
		});
	} else if((menuno == 33 || menuno == 43) && $.xlaq.request('mail')!='' && $.xlaq.request('code')!='') {
		//页面是重置手机或身份认证
		$('.note').hide();
		$('.verify').hide();
		$.xlaq.showTopTips('正在验证中，请稍候...');
		var params="m=validate_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail')+"&type="+$.xlaq.request('type');
		var url = DOMAIN_AQ+'interface/mail?'+params;
		$.getJSON(url+"&jsoncallback=?", function(json){
			$.xlaq.closeTopTips();
			if(json.result == 0) {
				$('.note').show();
				$('.verify').show();
				$.xlaq_acount.initAccount(json.data);
			} else {
				$('#wp_main_mobile').hide();
				$('#wp_main_idauth').hide();
				$('#wp_main_error').show();
				$('.xx_xgmi span').html(ERROR_AQ[json.result]);
			}
		});
	} else if(menuno == 63) {
		if(!$.xlaq.checkLogin()) {
			aqLoginPopup();
		} else {
			$('input').attr("checked", false);
			$.xlaq.showTopTips('正在努力查询中，请稍候...');
			var params="m=msg_get";
			var url = DOMAIN_AQ+'interface/account?'+params;
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq.closeTopTips();
				$('.wp_cont .ft').show();
				if(json.result == 0) {
					$("#safe_s0").find("option[text='"+json.data.total_num+"']").attr("selected",true);
					$("#safe_s0").attr("disabled","");
					if(json.data.ip_num == "1") {
						$("#safe_s1").attr("checked", true);
					}
					$("#safe_s1").attr("disabled","");
					if(json.data.phone_num == "1") {
						$("#safe_s3").attr("checked", true);
					}
					$("#safe_s2").attr("disabled","");
					if(json.data.email_num == "1") {
						$("#safe_s4").attr("checked", true);
					}
					$("#safe_s3").attr("disabled","");
					if(json.data.pwd_num == "1") {
						$("#safe_s2").attr("checked", true);
					}
					$("#safe_s4").attr("disabled","");
					if(json.data.question_num == "1") {
						$("#safe_s5").attr("checked", true);
					}
					$("#safe_s5").attr("disabled","");
					$.xlaq_acount.initAccount(json.data);
				} else if(json.result == 1012) {
					$.xlaq.showTips(2, '您目前还不是迅雷会员用户，无法使用安全特权！', "开通迅雷会员", "$.xlaq.goVipPaid");
					return false;
				} else if(json.result == 1013) {
					$.xlaq.showTips(2, '您必须设置手机才能使用特权，请您先设置手机！', "设置手机", "$.xlaq.goMobileSet");
					return false;
				} else {
					alert(json.message);
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(5);
					return false;
				}
			});


		}
	} else if(menuno == 73) {
		//帐号找回页面不用登录态
		$.xlaq_acount.initAccount();
	} else if(menuno == 45) {
        if(!$.xlaq.checkLogin()) {
            aqLoginPopup();
        } else {
            //获取常用登录地
            var common_login_address = false;
			var feedback_fip = false;
            var url = DOMAIN_AQ+'interface/account?m=get_common_login';
            $.getJSON(url+"&jsoncallback=?", function(json){
                if( json.result==200  ){
                    common_login_address = json.city;
                     $('#common_userd_login').html(json.city);
                     $('#common_login_ctype').html( json.ctype==0 ? '(系统检测)':'' );
                }else{
                    $('#common_userd_login').html(' 未知 ');
                }
                $('#loadMore').click(function(){
                    $.xlaq.showTopTips('正在努力查询中，请稍候...');
                    var ts = $(this).attr('timestamp');
                    if(!ts){
                        ts = ( new Date() ).getTime();
                    }
                    var url = DOMAIN_AQ+'interface/account?m=get_user_exception_login&page&ts='+ts;
                    $.getJSON(url+"&jsoncallback=?", function(json){
                        $.xlaq.closeTopTips();
                        if( json.result==0 || json.result==777  ){
                            $.each(json.data.records, function(k, v) {
                                $('#records').append(
                                  ( common_login_address && v.address!="-" && common_login_address!= v.address && common_login_address.split('-')[0]!= v.address.split('-')[0]  ?
                                    '<tr class="anomaly">':'<tr>' ) +
                                    '<td>' + v.datetime+'</td>' +
								    '<td fip="'+ v.fip+'">'+ v.ip +'</td>' +
                                    '<td>'+ v.address +'</td>' +
                                    '<td>'+ v.login_type +'</td>' +
                                    '<td>'+ v.pid +'</td>' +
                                    '<td><a href="#" class="feedback" data_sign="1">反馈</a></td>>' +
                                    '</tr>')
                            });
                            $('#loadMore').attr('timestamp',json.data.minstamp);
                        }
                        if(json.result==404){
                            $('#loadMore').addClass('non_a').unbind('click');
                            $('#showmax').html('没有更多记录了');
                        }
                        if(json.result==777){
                            $('#loadMore').addClass('non_a').unbind('click');
                            $('#showmax').html('此处只显示最近7天记录');
                        }
                    });
                }).trigger('click');
            });

            // 反馈
            $('.feedback').live('click',function(){
                var dom = $(this).parent().parent();
                $('.flo_bg,.pop_sc:eq(0)').show();
                for(var i=0;i<4;i++){
                    $('.pop_sc li').eq(i).find('span:eq(1)').html(dom.find('td').eq(i).html());
                }
                dom.hasClass('anomaly') ? ( $('.pop_sc .warn').show(),$('.pop_sc li:eq(2)').addClass('anomaly') ) : ( $('.pop_sc .warn').hide(),$('.pop_sc li:eq(2)').removeClass('anomaly') ) ;
            });
            // 关闭 和 完成 按钮
            $('.pop_sc .close,.pop_sc:eq(4) .btn').live('click',function(){
                $('.flo_bg,.pop_sc').hide();
            });
            //不是我登录的
            $('.pop_sc:eq(0) .btn:eq(1)').click(function(){
                 $('.pop_sc').hide().eq(2).show();
            });
            //上一步
            $('.pop_sc:eq(2) .btn:eq(0),.pop_sc:eq(1) .btn:eq(0),.pop_sc:eq(5) .btn:eq(0)').click(function(){
                $('.pop_sc').hide().eq(0).show();
            });
            //是我登录的
            $('.pop_sc:eq(0) .btn:eq(0)').click(function(){
                $('.pop_sc').hide().eq(1).show();
                var str = $('.pop_sc:eq(0) li:eq(2) span:eq(1)').html();
                var province = str.split('-').length>1 && str!=''&&str!='-'&&str  ? str.split('-')[0] : '',
                    city = str.split('-').length>1 && str!=''&&str!='-'&&str ? str.split('-')[1] : str,
                    province_html = '',city_html = '';
                console.log('p:'+province+'c:'+city);
                for( k in $.xlaq_acount.CITYS ){
                    province_html+='<option value="'+ k +'">' + k + '</option>';
                    if(k.split('-')[1]+'省'==province || k.split('-')[1]+'市'==city ){
                        province = k;
                        var citys = $.xlaq_acount.CITYS[k].split('|');
                        for(i=0;i<citys.length;i++){
                            var tmp = citys[i].split('-')[1];
                            city = tmp+'市'==city ? citys[i] : city;
                            city_html+='<option value="'+citys[i]+'">'+citys[i]+'</option>';
                        }
                    }
                }
                if(province==''&&city=='-'){
                    var citys = $.xlaq_acount.CITYS['A-安徽'].split('|');
                    for(i=0;i<citys.length;i++){
                        var tmp = citys[i].split('-')[1];
                        city = tmp+'市'==city ? citys[i] : city;
                        city_html+='<option value="'+citys[i]+'">'+citys[i]+'</option>';
                    }
                }
                $('select[name=city]').html(city_html).val(city);
                $('select[name=province]').html(province_html).val(province).change(function(){
                        var province = $(this).val();
                        var city_html = '';
                        var fst_city = '';
                        for( k in $.xlaq_acount.CITYS ){
                            if(k==province ){
                                var citys = $.xlaq_acount.CITYS[k].split('|');
                                for(i=0;i<citys.length;i++){
                                    if(i==0){ fst_city=citys[i]; }
                                    city_html+='<option value="'+citys[i]+'">'+citys[i]+'</option>';
                                }
                            }
                        }
                        $('select[name=city]').html(city_html).val(fst_city);
                });
            });
            //提交
            $('.pop_sc:eq(1) .btn:eq(1)').click(function(){
				var ip = feedback_fip ? feedback_fip : $('.pop_sc:eq(0) li:eq(1) span:eq(1)').html();
				var url = DOMAIN_AQ+'interface/account?m=feedback_common_login&ip='+ip+'&province='+$('select[name=province]').val().split('-')[1]+'&city='+$('select[name=city]').val().split('-')[1];
                $.getJSON(url+"&jsoncallback=?", function(json){
                      if(json.result==200){
                          $('.pop_sc').hide().eq(4).show();
                      }else{
                          $('.pop_sc').hide().eq(5).show().find('.tit').html('').html(ERROR_AQ[json.result]);
                      }
                });
            });

            // 不是我登录的？
            $('#common_not_me').click(function(){
                $('.pop_sc').hide();
                $('.flo_bg,.pop_sc:eq(6)').show();
            });

            //数据统计，四个按钮的点击情况
            $('[data_sign]').live('click',function(){
                var sign = 'common_login_';
                sign += $(this).attr('data_sign');
                var url = DOMAIN_AQ+'interface/access?m=tg&sign='+sign;
                $.getJSON(url+"&jsoncallback=?", function(json){
                });
            });


		}
	}else if(menuno == 75) {
		if(!$.xlaq.checkLogin()) {
			aqLoginPopup();
		} else {
			$.xlaq.showTopTips('正在努力查询中，请稍候...');

			// 保存旧日期
			var today = new Date();
			var todayStr = today.getFullYear() + '' + today.getMonth() + '' + today.getDate();
			var yesterday = new Date(today - 3600*24*1000);
			var yesterdayStr = yesterday.getFullYear() + '' + yesterday.getMonth() + '' + yesterday.getDate();

			// 获取当前请求的页数
			var page = 1;
			var reg = new RegExp("(^|&)page=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if (r!=null) page = r[2];

			var oldDay = '';

			// 获取用户账号
			var params="m=get_user_sensitive_record&page=" + page;
			var url = DOMAIN_AQ+'interface/account?'+params;
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq.closeTopTips();

				if (json.data.total_page == 0) {
					$('#records').append('<tr>' +
						'<td colspan="2">没有对应的记录</td>' +
						'</tr>')
					$('#page_list').html('');
					return;
				}

				$.each(json.data.records, function(k, v) {
					$('#records').append('<tr>' +
						'<td>' + v.operation_desc + '</td>' +
						'<td>' + v.time + '</td>' +
						'</tr>')
				});

				// 处理下面的页数 - begin
				if (json.data.current_page == 1 || json.data.total_page == 0) {  // 第一页的情况
					$('#pages').append('<a href="javascript:void(0)" class="non_a" >上一页</a>');
				} else {
					$('#pages').append('<a href="?page='+ (json.data.current_page-1) +'" >上一页</a>');
				}

				// 最多显示多少个页数
				var maxPages = 5;
				var half = parseInt(maxPages/2);

				var start = 1;

				for ( ; start <= json.data.total_page; ++start) {
					if (start > json.data.total_page) {
						break;
					}
					if (start == json.data.current_page) {
						$('#pages').append('<a href="?page=' + start + '" class="on_a">' + start + '</a>');
					} else {
						$('#pages').append('<a href="?page=' + start + '">' + start + '</a>');
					}
				}

				// 下一页按钮
				if (json.data.total_page <= json.data.current_page) {   // 已经是最后一页
					$('#pages').append('<a href="javascript:void(0)" class="non_a" >下一页</a>');
				} else {
					$('#pages').append('<a href="?page='+ (json.data.current_page+1) +'" >下一页</a>');
				}

				// 处理下面的页数 - end

            });
        }
    }else if( menuno == 769 ){  //迅雷7tips引导邮箱激活
        var C_AQINFO = unescape($.xlaq.getCookie("aq_info"));
        var C_AQINFO_ARY = C_AQINFO.split("&");

        var M_INFO = unescape($.xlaq.getCookie("m_info"));
        var M_INFO_ARY = M_INFO.split("&");
        var aqMail = M_INFO_ARY[0];

        if(C_AQINFO_ARY[1] == 1){
            $('.unact_mail').html(aqMail);
            $('#actMailSend').click(function(){
                $(this).html('发送中...');
                $.xlaq_acount.sendMail769();
                $(this).unbind('click');
            });
            $('#actMailResend').click(function(){
                $.xlaq_acount.sendMail769(1);
            });
            $('#jumptomail').click(function(){
                var mail_format = aqMail.split('@')[1];
                window.open('http://mail.'+mail_format);
            });
        }else{
            location.href="/account_index.html";
        }

        var username = decodeURIComponent($.xlaq.getCookie("usernick"));
        $('._show_usrname').html(username);
        var userid = $.xlaq.getCookie("usernewno");
        $('._show_userid').html(userid);
        $('#userimg').attr('src',"http://img.ucenter.xunlei.com/usrimg/"+userid+"/100x100");

        var url = 'https://dynamic-aq-ssl.xunlei.com/interface/access?m=tg&sign=activate_xl7';
        $.ajax({
            type: "GET",
            url: url,
            data: '',
            dataType: 'jsonp'
        });
        $.xlaq.setAqCookie('acfrom','xl7',86400);



    }else if( menuno == 770 ){

        var username = decodeURIComponent($.xlaq.getCookie("usrname"));
        $('._show_usrname').html(username);
        var userid = $.xlaq.getCookie("userid");
        $('._show_userid').html(userid);
        $('#userimg').attr('src',"http://img.ucenter.xunlei.com/usrimg/"+userid+"/100x100");

        if($.xlaq.request('type')=='mail') {
            //验证"验证安全资料发送邮件"中的验证码
            var params="m=activate_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail')+"&type="+$.xlaq.request('type')+"&activate_from=activate_xl7";
            var url = DOMAIN_AQ+'interface/mail?'+params;
            $.getJSON(url+"&jsoncallback=?", function(json){
                if(json.result == 0) {
                    $('#actSuccess').show();
                }else {
                    $('#actFail').show();
                    $('#actFailMsg').html(ERROR_AQ[json.result]);
                }
            });
        }else{
            alert('非法的激活链接!');
        }
    }else if( menuno == 780 ){

        var C_AQINFO = unescape($.xlaq.getCookie("m_info"));
        var C_AQINFO_ARY = C_AQINFO.split("&");
        var aqMail = C_AQINFO_ARY[0];
        var bindMail = C_AQINFO_ARY[1];

        if( $.xlaq.request('code') ){  //检查验证
            if($.xlaq.request('code')!='1'){
                var params="m=validate_check&code="+$.xlaq.request('code')+"&mail="+$.xlaq.request('mail')+"&type="+$.xlaq.request('type');
                var url = DOMAIN_AQ+'interface/mail?'+params;
                $.getJSON(url+"&jsoncallback=?", function(json){
                    $.xlaq.closeTopTips();
                    if(json.result != 0) {
                        $('#wp_main_mobile').hide();
                        $('#wp_main_idauth').hide();
                        $('#wp_main_error').show();
                        $('.xx_xgmi span').html(ERROR_AQ[json.result]);
                    }
                });
            }
            $('#wp_main_question,#wp_main_mail').hide();
            $('#set_common_login').show();
            //省份 城市 列表填充
            var url = DOMAIN_AQ+'interface/account?m=get_common_login';
            $.getJSON(url+"&jsoncallback=?", function(json){
                if( json.result==200  ){
                    var _province  = json.city.split('-')[0];
                    var _city  = json.city.split('-')[1];
                    var province_html = '';
                    var city_html = '';
                    for( k in $.xlaq_acount.CITYS ){
                        province_html+='<a href="javascript:void(0);" val="'+k+'">'+k+'</a>';
                        if(k.split('-')[1]+'省'==_province  || k.split('-')[1]+'市'==_city){
                            var citys = $.xlaq_acount.CITYS[k].split('|');
                            for(i=0;i<citys.length;i++){
                                var tmp = citys[i].split('-')[1];
                                if(tmp+'市'==_city){
                                    _city = citys[i];
                                }
                                city_html+='<a href="javascript:void(0);" val="'+citys[i]+'">'+citys[i]+'</a>';;
                            }
                        }
                        var tmp = k.split('-')[1];
                        if(tmp+'省'==_province){
                            _province = k;
                        }
                    }
                    $('#show_province').html(_province);
                    $('#show_city').html(_city);
                    $('#show_province_list').html('').html(province_html);
                    $('#show_city_list').html('').html(city_html);
                    // 下拉框hover
                    $('.drop_form').hover(
                        function(){
                            $(this).addClass('drop_hv');
                            $(this).find(".drop_form_list").show();
                            $(this).parent().addClass("z_type");/* 注：IE6-7下，上层下拉元素无法遮挡到下层元素，因此必须每次手动添加Z值以实现遮挡效果，z_type的z值为99 */
                        },function(){
                            $(this).removeClass('drop_hv');
                            $(this).find(".drop_form_list").hide().removeClass("dp_ani");
                            $(this).parent().removeClass("z_type");
                        }
                    );
                    // 选择下拉框列表
                    $('.drop_form').find('a').live('click',function(){
                        var v = $(this).html();
                        $(this).parent().parent().find('.txt_show').html(v);
                        $(this).parent().hide();
                    });
                    $('#show_province_list a').live('click',function(){
                        var province = $(this).html();
                        var city_html = '';
                        var fst_city = '';
                        for( k in $.xlaq_acount.CITYS ){
                            if(k==province ){
                                var citys = $.xlaq_acount.CITYS[k].split('|');
                                for(i=0;i<citys.length;i++){
                                    if(i==0){ fst_city=citys[i]; }
                                    city_html+='<a href="javascript:void(0);" val="'+citys[i]+'">'+citys[i]+'</a>';
                                }
                            }
                        }
                        $('#show_city').html('').html(fst_city);
                        $('#show_city_list').html('').html(city_html);
                    });

                }else{
                    $('#common_userd_login').html(' 未知 ');
                }
            });

            $('#common_next').click(function(){
                $.xlaq.showTopTips("修改中,请稍后...");
                var url = DOMAIN_AQ+'interface/account?m=set_common_login&province='+$('#show_province').html()+'&city='+$('#show_city').html();
                $.getJSON(url+"&jsoncallback=?", function(json){
                    if(json.result==200){
                        $.xlaq.closeTopTips();
                        $('#common_login_suc').show();
                        $('#set_common_login').hide();
                    }else{
                        $.xlaq.showTopTips(ERROR_AQ[json.result], 1);
                    }
                });
            });


        }else{   //发起验证
            var highestCheckEvent = $.xlaq_acount.highestCheckEvent();
            if( highestCheckEvent=='mobile' ){
                $.xlaq_acount.checkByMobile('common_login');
            }
            else if( highestCheckEvent=='mail' ){
                $.xlaq_acount.checkByMail('common_login');
            }
            else if( highestCheckEvent=='question' ){
                $.xlaq_acount.checkByQuestion('common_login');
            }else{
                location.href = '/common_login_modify.html?code=1';
            }

        }
    }
    else if(!$.xlaq.checkLogin()) {
		aqLoginPopup();
	} else {
		if(C_AQINFO == '') {
			var params="m=init";
			var url = DOMAIN_AQ+'interface/account?'+params;
			$.xlaq.showTopTips('正在查询中，请稍候...');
			$.getJSON(url+"&jsoncallback=?", function(json){
				$.xlaq.closeTopTips();
				if(json.result == 0) {
					$.xlaq_acount.initAccount();
				} else if(json.result == 3 || json.result == 5001 ) {
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(5);
				} else if(json.result == 2){
					$.xlaq.setXlCookie('userid', '');
					$.xlaq.setXlCookie('sessionid', '');
					aqLoginPopup();
				} else {
					$.xlaq.showTopTips(ERROR_AQ[json.result], 1);
					$.xlaq.closeTopTipsDelay(3);
				}
			});
		} else {
			$.xlaq_acount.initAccount();
		}
	}
	//绑定enter事件
	$(document).bind('keyup',function(event){
		if(event.keyCode == 13) {
			if($('.msg').is(":visible")) {
				$('.msg a:eq(0)').click();
			} else if($(".pop").is(":visible")){
				$('.pop .btn_ok').click();
			} else if(menuno == 53) {
				if($('#wp_main_mobile').is(":visible")) {
					$('#mobile_btn').click();return false;
				} else if($('#wp_main_question').is(":visible")) {
					$('#wp_main_question .btn_nor').click();return false;
				} else if($('#wp_main_password').is(":visible")) {
					$('#wp_main_password .btn_nor').click();return false;
				}
			} else if(menuno == 13) {
				$('#submit').click();
			} else if(menuno == 23) {
				if($('#btn1').is(":visible")){
					$('#btn1 .btn_nor').click();
				}else if($('#btn2').is(":visible")){
					$('#btn2 .btn_nor').click();
				}
			} else if(menuno == 33) {
				$('#submit').click();
			} else if(menuno == 43) {
				$('.btn_nor').click();
			} else if(menuno == 73) {
				$('#wp_main1 .btn_nor').click();
			}
		}
	});
	//绑定输入框选中事件
	$('input').focus(function(){
		if($(this).attr('type') == 'radio') return;

		var thisClass = $(this).attr('class');
		if(thisClass == 'in_ver align'){
			$(this).attr('class','in_ver align ver_on');
		}else{
			$(this).attr('class','in_ver ver_on');
		}
	});
	$('input').blur(function(){
		if($(this).attr('type') == 'radio') return;

		var thisClass = $(this).attr('class');
		if(thisClass == 'in_ver align ver_on'){
			$(this).attr('class','in_ver align');
		}else{
			$(this).attr('class','in_ver');
		}
	});
});